// NspireIO Translation Layer
// niotl_: NspireIO Translation Layer

// List of printing syscalls to translate:
// printf(), getchar(), gets(), putchar(), puts(), vprintf(), (maybe) scanf()

// Convert printf() calls to NIOTL ones
#define printf(const char *format, ...) niotl_printf(const char *format, ...)

// Convert getchar() calls to NIOTL ones
#define getchar(void) niotl_getchar(void)

// Convert gets() calls to NIOTL ones
// gets() for NIOTL will be secured and non-destructive
#define gets(char* str) niotl_gets(char* str)

// Converts putchar() calls to NIOTL ones
#define putchar(int character) niotl_putchar(int character)

// Converts puts() calls to NIOTL ones
#define puts(const char* str) niotl_puts(const char* str)

// Converts vprintf() calls to NIOTL ones
#define vprintf(const char* format, va_list arg) niotl_vprintf(const char* format, va_list arg)

// Finally, convert scanf() calls to NIOTL ones
#define scanf(const char* format, ...) niotl_scanf(const char* format, ...)

// Prototypes
int niotl_printf(const char *format, ...);
int niotl_getchar(void);
char* niotl_gets(char* str);
int niotl_putchar(int character);
int niotl_puts(const char* str);
int niotl_vprintf(const char* format, va_list arg);
int niotl_scanf(const char* format, ...);
